//
//  HYXRegister2ViewController.m
//  SpeSmartUnitTester_Example
//
//  Created by Points on 2020/8/17.
//  Copyright © 2020 hfqf123. All rights reserved.
//

#import "HYXRegister2ViewController.h"

@interface HYXRegister2ViewController ()

@end

@implementation HYXRegister2ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.vm = [[HYXloginViewModel alloc]initWith:self delegate:self];
}

- (IBAction)commitBtnClicked:(id)sender {
    [(id)self.vm registerCommitBtnClicked];
}

- (IBAction)requestCodeBtnClicked:(id)sender {
     [(id)self.vm requestCodeBtnClicked];
}

#pragma mark - HYXUnitTestBaseViewModelProtocol

- (void)onGetMockData{
    #if NEED_UNITTEST
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [(id)self.vm reloadWithMockData4Register];
    });
    #endif
}

- (void)onStartExcuteBussnessLogic{
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [(id)self.vm requestCodeBtnClicked];
    });
}
@end
